package com.far.permissions.interceptor;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface CatMapper {
    @Select("select * from cat c where c.name = #{name} and c.color = #{color}")
    Cat selectOne(String name, String color);

    @Update("update cat set name = #{name} where id = #{id}")
    int updateOne(String name, String id);

    @Delete("DELETE from cat where id = #{id}")
    void delete(String id);
}
